
public class CharStack {
	int n;
	char [] a;
	int top = -1;
	public CharStack(int m) { 
		this.n=m;
	}
	void getStack() { // 定义栈的大小
		a = new char[n];
	}
	void push(char data) {  //压栈
		a[++top]=data;
	}
	char pop() {//出栈
		return a[top--];
	}
	
}

